#include <kernel.h>
#include <pa4.h>
#include <buf.h>
/* 
 * Part A 1/4. buf_init()
 * buf_init() is responsible for initializing buffer cache management.
 */
void buf_init(void) {
int i;
buf_head=NULL;
buf_count=0;
invalid=getmem(sizeof(int)*PA4_BUFFER_SIZE);

for(i=0;i<PA4_BUFFER_SIZE;i++)
invalid[i]=0;

}
